package request

type UserLoginWithUsername struct {
	Username string `form:"username" json:"username" binding:"required"` // 用户名
	Password string `form:"password" json:"password" binding:"required"` // 密码
}

type UserLoginWithUsernameFull struct {
	Username string  `form:"username"  json:"username" binding:"required"` // 用户名
	Password string  `form:"password"  json:"password" binding:"required"` // 密码
	UserAgent string `form:"userAgent" json:"userAgent"` // userAgent
	ClientIp string  `form:"clientIp"  json:"clientIp"` // Client IP
}

type UserUpdate struct {
	Nickname  string `form:"nickname" json:"nickname"`
	Status    int    `form:"status" json:"status"`
	CompanyId uint   `form:"company_id" json:"company_id"`
	ExCompanyIds string   `form:"ex_company_ids" json:"ex_company_ids"`
}

type CurrentUserUpdate struct {
	Nickname string `form:"nickname" json:"nickname"`
}

type UserCreate struct {
	Username  string `form:"username" json:"username"`
	Nickname  string `form:"nickname" json:"nickname"`
	Password  string `form:"password" json:"password"`
	CompanyId uint   `form:"company_id" json:"company_id"`
	ExCompanyIds string   `form:"ex_company_ids" json:"ex_company_ids"`
}

type UserStatus struct {
	ID     uint `form:"id" json:"id" binding:"required"`
	Status int  `form:"status" json:"status" binding:"required"`
}

type UserPassword struct {
	RPassword string `form:"r_password" json:"r_password" binding:"required"` // 原密码
	Password  string `form:"password" json:"password" binding:"required"`     // 新密码
	CPassword string `form:"c_password" json:"c_password" binding:"required"` // 确认密码
}

type UserPasswordReset struct {
	Id          uint   `form:"ID" json:"ID" binding:"required"`                   // 新密码
	NewPassword string `form:"newPassword" json:"newPassword" binding:"required"` // 新密码
}

type UserIpLimit struct {
	Id      uint   `form:"ID" json:"ID" binding:"required"`
	AllowIp string `form:"allowIp" json:"allowIp"` // 授权ip
	BanIp   string `form:"banIp" json:"banIp"`     // 禁止ip
}

type UserPagination struct {
	Pagination
	Keyword string `form:"keyword" json:"keyword"` // 关键词
	Status  *int   `form:"status" json:"status"`   // 状态
}
